Image processing method and apparatus

ABSTRACT

An image processing method, an image processing apparatus, an electronic device, and a computer-readable storage medium are provided. In the method, a video image is acquired, where the video image includes a two-dimensional sticker, and the two-dimensional sticker includes a target area. by performing key point detection on the video image, a preset number of first key points associated with the target area in the two-dimensional sticker are acquired. The preset number of second key points that are marked and associated with the target area are acquired. A display area of the two-dimensional sticker in the video image is determined according to the preset number of the first key points and the preset number of the second key points, and the two-dimensional sticker is rendered in the display area.

REFERENCE TO RELATED APPLICATION

This application claims priority to Chinese Patent Application No.201910876526.9, titled “IMAGE PROCESSING METHOD AND APPARATUS”, filed onSep. 17, 2019, which is incorporated herein by reference in itsentirety.

FIELD

The present disclosure relates to the field of image processing, and inparticular to an image processing method, an image processing apparatus,and a computer readable storage medium.

BACKGROUND

With the continuous development of the Internet and computer technology,various terminal applications are developed. Some applications in theterminal, especially video applications (such as Tik Tok, Short Video,Quick Hand, etc.), are the mostly used applications for entertainment.In some application scenarios, special effects are usually added tovideos to enhance the interactive effect. For example, some interestingstickers may be attached.

In the conventional technology, a two-dimensional sticker is usuallyattached to a video by scaling the two-dimensional sticker to a fixedarea in the video for display. This sticker display method causesinflexible video images and unintelligent human-computer interaction.

SUMMARY

This summary is provided to introduce the idea in a simplified form. Theidea will be described in detail in the following description. Thissummary is neither intended to identify key features or essentialfeatures of the claimed technical solution, nor intended to be used tolimit the scope of the claimed technical solution.

The technical problem solved by the present disclosure is to provide animage processing method, so as to at least partially solve the technicalproblems of inflexible video images and unintelligent human-computerinteraction in the conventional technology. In addition, an imageprocessing apparatus, an image processing hardware device, a computerreadable storage medium and an image processing terminal are alsoprovided.

In order to achieve the above object, according to an aspect of thepresent disclosure, the following technical solutions are provided.

An image processing method includes:

-   -   acquiring a video image, where the video image includes a        two-dimensional sticker, and the two-dimensional sticker        includes a target area;    -   performing key point detection on the video image to obtain a        preset number of first key points associated with the target        area;    -   acquiring the preset number of second key points that are marked        and associated with the target area;    -   determining a display area of the two-dimensional sticker in the        video image according to the preset number of the first key        points and the preset number of the second key points; and    -   rendering the two-dimensional sticker in the display area.

In order to achieve the above object, according to an aspect of thepresent disclosure, the following technical solutions are provided.

An image processing apparatus includes:

-   -   an image acquiring module, configured to acquire a video image,        where the video image includes a two-dimensional sticker, and        the two-dimensional sticker includes a target area;    -   a key point detecting module, configured to perform key point        detection on the video image to obtain a preset number of first        key points associated with the target area;    -   a key point acquiring module, configured to acquire the preset        number of second key points that are marked and associated with        the target area;    -   a display area determining module, configured to determine a        display area of the two-dimensional sticker in the video image        according to the preset number of the first key points and the        preset number of the second key points; and    -   a sticker display module, configured to render the        two-dimensional sticker in the display area.

In order to achieve the above object, according to an aspect of thepresent disclosure, the following technical solutions are provided.

An electronic device includes:

-   -   a memory, storing non-transitory computer readable instructions;        and    -   a processor, configured to execute the computer readable        instructions to perform any of the above image processing        method.

In order to achieve the above object, according to an aspect of thepresent disclosure, the following technical solutions are provided.

A computer-readable storage medium stores non-transitory computerreadable instructions, where the non-transitory computer readableinstructions, when being executed by a computer, cause the computer toperform any of the above image processing method.

In order to achieve the above object, according to an aspect of thepresent disclosure, the following technical solutions are provided.

An image processing terminal includes any of the above image processingapparatus.

In the embodiments of the present disclosure, by performing key pointdetection on the video image, a preset number of first key pointsassociated with the target area in the two-dimensional sticker areacquired, and the preset number of second key points that are marked andassociated with the target area are acquired. The display area of thetwo-dimensional sticker in the video image is determined according tothe preset number of the first key points and the preset number of thesecond key points, and the two-dimensional sticker is rendered in thedisplay area. In this way, the display area in the video image can beadaptively adjusted according to the target area of the two-dimensionalsticker, so that the video images are more flexible and thehuman-computer interaction is more intelligent.

The above description is only an overview of the technical solutions ofthe present disclosure. For better understanding of the technicalsolutions of the present disclosure and implementing the technicalsolutions according to the specification, and to make the above andother objectives, features and advantages of the technical solutions inthe present disclosure clearer, the detailed description is providedbelow with reference to preferred embodiments and the accompanyingdrawings.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other features, advantages and aspects of variousembodiments of the present disclosure will become more clear when takenin conjunction with the accompanying drawings and with reference to thefollowing detailed description. Throughout the drawings, the same orsimilar reference numbers refer to the same or similar elements. Itshould be understood that the drawings are schematic and that the unitsand elements are not necessarily drawn to scale.

FIG. 1 is a flowchart of an image processing method according to anembodiment of the present disclosure;

FIG. 2 is a flowchart of an image processing method according to anembodiment of the present disclosure;

FIG. 3 is a schematic structural diagram of an image processingapparatus according to an embodiment of the present disclosure; and

FIG. 4 is a schematic structural diagram of an electronic deviceaccording to an embodiment of the present disclosure.

DETAILED DESCRIPTION

Embodiments of the present disclosure will be described in more detailbelow with reference to the accompanying drawings. While certainembodiments of the present disclosure are shown in the drawings, itshould be understood that the present disclosure may be embodied invarious forms and should not be construed as being limited to theembodiments set forth herein. The embodiments are provided for a morethorough and complete understanding. It should be understood that thedrawings and embodiments of the present disclosure are only provided asexamples, and are not intended to limit the protection scope of thepresent disclosure.

It should be understood that the various steps described in the methodembodiments of the present disclosure may be performed in differentorders and/or in parallel. Furthermore, method embodiments may includeadditional steps and/or omit an illustrated step. The scope of thepresent disclosure is not limited in this regard.

As used herein, the terms “including” and “comprising” and variationsthereof are non-exclusive, i.e., meaning “including but not limited to”.The term “based on” means “at least partially based on”. The term “anembodiment” means “at least one embodiment”, the term “anotherembodiment” means “at least one another embodiment”, and the term “someembodiments” means “at least some embodiments”. Relevant definitions ofother terms will be given in the description below.

First Embodiment

In order to solve the technical problems of inflexible video images andunintelligent human-computer interaction in the conventional technology,embodiments of the present disclosure provide an image processingmethod. As shown in FIG. 1 , the image processing method mainly includesthe following steps S11 to S15.

In step S11, a video image is obtained, where the video image includes atwo-dimensional sticker, and the two-dimensional sticker includes atarget area.

The video image may be a video stream inputted in real time, such as alive video in a short video application, or may be a video imagepre-stored in the terminal. The terminal may be a mobile terminal, suchas a smart phone or a tablet computer, or a fixed terminal, such as adesktop computer.

The two-dimensional sticker is a wallpaper that a user likes to add tothe a video image to make their video more personalized and perfect. Forexample, the sticker may contain a character (such as a favorite star, aselfie photo, a friends photo, etc.), a beautiful scenery, or a favoriteanimal. The two-dimensional sticker may be a triangular sticker, arectangular sticker, a circular sticker, a polygonal sticker, or thelike, which is not specifically limited here.

The target area may be set by the user. For example, a person area, alandscape area, or an animal area in the two-dimensional sticker may beselected as the target area. The target area may be a triangular area, arectangular area, a circular area, a polygonal sticker (a polygon havingfour or more sides), or the like, which is not specifically limitedhere.

In step S12, key point detection is performed on the video image toobtain a preset number of first key points associated with the targetarea.

The preset number may be set by the user, or may be set according to theshape of the target area. For example, if the target area is atriangular area, the preset number is three; if the target area is arectangular area, the preset number is four; if the target area is acircular area, the preset number is at least three; and if the targetarea is a polygon area, the preset number is the number of vertices ofthe polygon area.

The first key point may be a point on the target area, such as a vertexof the target area, or a point on the boundary of the target area, or apoint around the target area. The point around the target area has acertain positional relationship with the target area, such as a pointadjacent to a vertex of the target area.

In some embodiments, an augmented reality (AR) scan may be used toperform key point detection on the video image to obtain a preset numberof first key points associated with the target area. The AR scan may beimplemented by any of the following key point detection algorithms: adetection algorithm based on Gaussian Laplacian operator (LOG), adetection algorithm based on pixel point Hessian matrix (second-orderdifferential) and its determinant value (DOH), a scale-invariant featuretransformation (SIFT) detection algorithm, a SIFT detection algorithm ofspeed up robust features (SURF), etc.

In step S13, the preset number of second key points that are marked andassociated with the target area are acquired.

The second key points are marked points associated with the target areain the two-dimensional sticker. The number and positions of the secondkeypoints correspond to those of the first keypoints. For example, ifthe first key point is a point on the target area, the second key pointis also a point on the target area, such as a vertex of the target area,or a point on the boundary of the target area. If the first key point isa point around the target area, the second key point is also a pointaround the target area, such as a point adjacent to a vertex of thetarget area.

Specifically, the preset number of second key points associated with thetarget area in the two-dimensional sticker may be manually pre-marked.The marked second key points are stored in a local database, or sent toa server for storage. The server may be a server corresponding to ashort video application. In this step, the second key points areacquired from the local database or a server.

In step S14: a display area of the two-dimensional sticker in the videoimage is determined according to the preset number of the first keypoints and the preset number of the second key points.

The shape of the display area corresponds to the shape of thetwo-dimensional sticker. For example, if the shape of thetwo-dimensional sticker is a triangle, the display area is a trianglearea; if the shape of the two-dimensional sticker is a rectangle, thedisplay area is a rectangle area; if the shape of the two-dimensionalsticker is a circle, the display area is a circular area; and if theshape of the two-dimensional sticker is a polygon, the display area is apolygon area, which are not specifically limited here.

In step S15, the two-dimensional sticker is rendered in the displayarea.

Specifically, in the rendering, various elements (including characters,words and background lights) contained in the two-dimensional stickerare rendered at corresponding positions in the display area.

In this embodiment, by performing key point detection on the videoimage, a preset number of first key points associated with the targetarea in the two-dimensional sticker are acquired, and the preset numberof second key points that are marked and associated with the target areaare acquired. The display area of the two-dimensional sticker in thevideo image is determined according to the preset number of the firstkey points and the preset number of the second key points, and thetwo-dimensional sticker is rendered in the display area. In this way,the display area in the video image can be adaptively adjusted accordingto the target area of the two-dimensional sticker, so that the videoimages are more flexible and the human-computer interaction is moreintelligent.

In an optional embodiment, step S14 may include the following step S141to S143.

In step S141, a perspective transformation matrix is determinedaccording to a correspondence between the preset number of the first keypoints and the preset number of the second key points.

The perspective transformation matrix is a square matrix, and thedimension of the square matrix may be 3.

In step S142, the preset number of third key points corresponding to thetwo-dimensional stickers are determine in the video image according tothe perspective transformation matrix.

The perspective transformation matrix records the correspondence betweenthe marked key points in the two-dimensional sticker and the key pointsof the two-dimensional sticker detected in the video image. When themarked key points in the two-dimensional sticker are known, Thecorresponding key points in the video image can be determined accordingto the perspective transformation matrix.

The preset number may be set by the user, or may be set according to theshape of the two-dimensional sticker. For example, if thetwo-dimensional sticker has a triangular area, the preset number isthree; if the two-dimensional sticker has a rectangular area, the presetnumber is four; if the two-dimensional sticker has a circular area, thepreset number is at least three; and if the two-dimensional sticker hasa polygonal area, the preset number is the number of vertices of thepolygonal area.

The third key points are points on the two-dimensional sticker, such asvertices of the two-dimensional sticker, or points on the boundary ofthe two-dimensional sticker.

In step S143, the display area of the two-dimensional sticker in thevideo image is determined according to the preset number of third keypoints.

Specifically, the determined preset number of third key points areconnected in sequence, and the formed closed area is determined as thedisplay area. The shape of the display area corresponds to the shape ofthe two-dimensional sticker. For example, if the shape of thetwo-dimensional sticker is a triangle, the display area is a trianglearea; if the shape of the two-dimensional sticker is a rectangle, thedisplay area is a rectangle area; if the shape of the two-dimensionalsticker is a circle, the display area is a circular area; and if theshape of the two-dimensional sticker is a polygon, the display area is apolygon area, which are not specifically limited here.

In this embodiment, a perspective transformation matrix is determinedaccording to the corresponding relationship between the preset number offirst key points and the preset number of second key points. Then thepreset number of third key points corresponding to the two-dimensionalsticker are determined in the video image according to the perspectivetransformation matrix, and the display area of the two-dimensionalsticker in the video image is determined according to the preset numberof the third key points. In this way, the two-dimensional stickersrendered in the display area may have a three-dimensional effect.

In an optional embodiment, step S141 may include the following stepsS1411 to S1416.

In step S1411, a coefficient matrix is constructed according tocoordinates of the preset number of the first key points and coordinatesof the preset number of the second key points.

The coefficient matrix is a square matrix, and the dimension of thesquare matrix depends on the preset number.

For example, when the preset number is 4, the coordinates correspondingto the 4 first key points are respectively denoted as (u1,v1), (u2,v2),(u3,v3) and (u4,v4)), and coordinates corresponding to the 4 second keypoint are denoted as (x1,y1), (x2,y2), (x3,y3) and (x4,y4)). Thefollowing coefficient matrix can be constructed:

$\begin{pmatrix}x_{1} & y_{1} & 1 & 0 & 0 & 0 & {{- x_{1}}u_{1}} & {{- y_{1}}u_{1}} \\0 & 0 & 0 & x_{1} & y_{1} & 1 & {{- x_{1}}v_{1}} & {{- y_{1}}v_{1}} \\x_{2} & y_{2} & 1 & 0 & 0 & 0 & {{- x_{2}}u_{2}} & {{- y_{2}}u_{2}} \\0 & 0 & 0 & x_{2} & y_{2} & 1 & {{- x_{2}}v_{2}} & {{- y_{2}}v_{2}} \\x_{3} & y_{3} & 1 & 0 & 0 & 0 & {{- x_{3}}u_{3}} & {{- y_{3}}u_{3}} \\0 & 0 & 0 & x_{3} & y_{3} & 1 & {{- x_{3}}v_{3}} & {{- y_{3}}v_{3}} \\x_{4} & y_{4} & 1 & 0 & 0 & 0 & {{- x_{4}}u_{4}} & {{- y_{4}}u_{4}} \\0 & 0 & 0 & x_{4} & y_{4} & 1 & {{- x_{4}}v_{4}} & {{- y_{4}}v_{4}}\end{pmatrix}.$

In step S1412, a first one-dimensional matrix is constructed accordingto the coordinates of the preset number of the first key points.

For example, the coordinates corresponding to the 4 first key points are(u1,v1), (u2,v2), (u3,v3) and (u4,v4)), which are arranged vertically insequence to obtain the following one-dimensional matrix:

$\begin{pmatrix}u_{1} \\v_{1} \\u_{2} \\v_{2} \\u_{3} \\v_{3} \\u_{4} \\v_{4}\end{pmatrix}$

In step S1413, the perspective transformation matrix is taken as anunknown matrix, and the perspective transformation matrix is convertedinto a second one-dimensional matrix.

For example, the perspective transformation matrix may be the following3*3 square matrix:

$\begin{pmatrix}{m0} & {m1} & {m2} \\{m3} & {m4} & {m5} \\{m6} & {m7} & 1\end{pmatrix}$

where m0, m1, m2, m3, m4, m5, m6, m7 are unknowns, which can beconverted into the following one-dimensional matrix:

$\begin{pmatrix}m_{0} \\m_{1} \\m_{2} \\m_{3} \\m_{4} \\m_{5} \\m_{6} \\m_{7}\end{pmatrix}.$

In step S1414, a first matrix equation is formed according to thecoefficient matrix, the first one-dimensional matrix and the secondone-dimensional matrix, where the first matrix equation is that thefirst one-dimensional matrix is equal to the coefficient matrixmultiplied by the second one-dimensional matrix.

For example, according to the examples in the above steps, the followingfirst matrix equation can be formed according to the above coefficientmatrix, the first one-dimensional matrix, and the second one-dimensionalmatrix:

$\begin{pmatrix}u_{1} \\v_{1} \\u_{2} \\v_{2} \\u_{3} \\v_{3} \\u_{4} \\v_{4}\end{pmatrix} = {\begin{pmatrix}x_{1} & y_{1} & 1 & 0 & 0 & 0 & {{- x_{1}}u_{1}} & {{- y_{i}}u_{1}} \\0 & 0 & 0 & x_{1} & y_{1} & 1 & {{- x_{1}}v_{1}} & {{- y_{1}}v_{1}} \\x_{2} & y_{2} & 1 & 0 & 0 & 0 & {{- x_{2}}u_{2}} & {{- y_{2}}u_{2}} \\0 & 0 & 0 & x_{2} & y_{2} & 1 & {{- x_{2}}v_{2}} & {{- y_{2}}v_{2}} \\x_{3} & y_{3} & 1 & 0 & 0 & 0 & {{- x_{3}}u_{3}} & {{- y_{3}}u_{3}} \\0 & 0 & 0 & x_{3} & y_{3} & 1 & {{- x_{3}}v_{3}} & {{- y_{3}}v_{3}} \\x_{4} & y_{4} & 1 & 0 & 0 & 0 & {{- x_{4}}u_{4}} & {{- y_{4}}u_{4}} \\0 & 0 & 0 & x_{4} & y_{4} & 1 & {{- x_{4}}v_{4}} & {{- y_{4}}v_{4}}\end{pmatrix}{\begin{pmatrix}m_{0} \\m_{1} \\m_{2} \\m_{3} \\m_{4} \\m_{5} \\m_{6} \\m_{7}\end{pmatrix}.}}$

In step S1415, the second one-dimensional matrix is obtained by solvingthe first matrix equation.

In step S1416, the perspective transformation matrix is determinedaccording to the second one-dimensional matrix.

The second one-dimensional matrix is converted from the perspectivetransformation matrix. After the second one-dimensional matrix isobtained, the perspective transformation matrix is restored according tothe second one-dimensional matrix.

In an optional embodiment, step S1415 specifically includes thefollowing steps A to E.

In step A, the coefficient matrix is decomposed into a product of afirst matrix and a second matrix.

For example, denoting the coefficient matrix as A, A can be decomposedas: A=L*U, where L is the first matrix and U is the second matrix.

In sep B, the product of the second matrix and the secondone-dimensional matrix is determined as a third matrix.

For example, denoting the third matrix as c, and denoting the secondone-dimensional matrix as B, we have c=U*B.

In step C, the first matrix equation is converted into a second matrixequation according to the third matrix, where the second matrix equationis that the first one-dimensional matrix is equal to the first matrixmultiplied by the third matrix.

For example, denoting the first one-dimensional matrix as b, thecorresponding first matrix equation is A*B=b. Since A=L*U and c=U*B, thesecond matrix equation is L*c=b.

In step D, the third matrix is obtained by solving the second matrixequation.

In the second matrix equation, since both L and b are known matrices,the third matrix c can be obtained by solving the second matrixequation.

In step E, the second one-dimensional matrix is determined according tothe third matrix and the second matrix.

The third matrix c is obtained by solving the second matrix equation instep D. Since c=U*B, and U is a known matrix, the second one-dimensionalmatrix B is the inverse matrix of U multiplied by c.

In an optional embodiment, step S15 specifically includes the followingstep S151 and S152.

In step S151, a mapping relationship between pixel points in the displayarea and pixel points in the two-dimensional sticker is determined.

The pixel point at each pixel position in the display area has acorresponding relationship with a pixel point in the two-dimensionalsticker. For example, when the number of pixels in the display area issmaller than the number of pixels in the two-dimensional sticker, apixel point at one pixel position in the display area corresponds topixels at multiple adjacent positions in the two-dimensional sticker.For example, the pixel values, that is, the color values, of the pixelpoints at multiple adjacent positions in the two-dimensional sticker areaveraged to obtain the pixel value of the pixel point at thecorresponding position in the display area. When the number of pixels inthe display area is equal to the number of pixels in the two-dimensionalsticker, a pixel point at a pixel position in the display areacorresponds to a pixel at a corresponding position in thetwo-dimensional sticker. When the number of pixels in the display areais more than the number of pixels in the two-dimensional sticker,interpolation is performed on the pixels in the two-dimensional stickerso that the number of the pixels in the two-dimensional sticker is morethan or equal to the number of pixels in the display area, and then thecorrespondence between their pixels is determined.

In step S152, the two-dimensional sticker is rendered in the displayarea according to the mapping relationship.

In an optional embodiment, step S151 specifically includes the followingsteps S1511 and S1522.

In step S1511, for each of the pixel points in the display area, a thirdone-dimensional matrix is constructed for the pixel point in the displayarea.

Specifically, for a pixel at any position in the display area, thecoordinates of the pixel are denoted as (u, v), and it is converted intothe following one-dimensional column matrix:

$\begin{pmatrix}{wu} \\{wv} \\w\end{pmatrix},$

where, w=m6x+m7y+1, and (x, y) is the coordinates of the pixel in thetwo-dimensional sticker.

In step S1512, the product of the third one-dimensional matrix and theinverse matrix of the perspective transformation matrix is calculated asthe corresponding pixel point in the two-dimensional sticker.

Since the third one-dimensional matrix is a known matrix, thecorresponding pixel points in the two-dimensional sticker can bedetermined according to the following perspective transformationformula:

$\begin{pmatrix}{wu} \\{wv} \\w\end{pmatrix} = {\begin{pmatrix}{m0} & {m1} & {m2} \\{m3} & {m4} & {m5} \\{m6} & {m7} & 1\end{pmatrix}\begin{pmatrix}x \\y \\1\end{pmatrix}}$

In an optional embodiment, step S152 specifically includes the followingsteps S1521 and S1522.

In step S1521, for each of the pixel points in the display area, a pixelpoint in the two-dimensional sticker and corresponding to the pixelpoint in the display area is determined.

In step S1522, each of the pixel points in the display area is renderedaccording to a pixel value of the pixel point in the two-dimensionalsticker and corresponding to the pixel point in the display area.

Second Embodiment

This embodiment is a specific implementation. In this embodiment, anexample that the two-dimensional sticker is a rectangular sticker andthe corresponding key points are vertices is used to explain thetechnical solution of the present disclosure. As shown in FIG. 2 , theimage processing method mainly includes the following steps S21 to StepS25.

In step S21, a video image is acquired, where the video image includes atwo-dimensional sticker, and the two-dimensional sticker includes arectangular area.

In step S22, vertex detection is performed on the video image to obtainfour vertices associated with the rectangular area.

The closed area formed by the four vertices may be a rectangular area ora quadrilateral area.

In step S23, four marked vertices of the rectangular area are acquired.

In step S24, a perspective transformation matrix is determined accordingto the four detected vertices of the rectangular area and the fourmarked vertices of the rectangular area.

Specifically, the coordinates corresponding to the detected fourvertices of the rectangular area are denoted as (u1,v1), (u2,v2),(u3,v3) and (u4,v4) respectively, and the coordinates of the four markedvertices of the rectangular area are denoted as (x1, y1), (x2,y2), (x3,y3) and (x4, y4)). The following coefficient matrix can be constructed:

$\begin{pmatrix}x_{1} & y_{1} & 1 & 0 & 0 & 0 & {{- x_{1}}u_{1}} & {{- y_{1}}u_{1}} \\0 & 0 & 0 & x_{1} & y_{1} & 1 & {{- x_{1}}v_{1}} & {{- y_{1}}v_{1}} \\x_{2} & y_{2} & 1 & 0 & 0 & 0 & {{- x_{2}}u_{2}} & {{- y_{2}}u_{2}} \\0 & 0 & 0 & x_{2} & y_{2} & 1 & {{- x_{2}}v_{2}} & {{- y_{2}}v_{2}} \\x_{3} & y_{3} & 1 & 0 & 0 & 0 & {{- x_{3}}u_{3}} & {{- y_{3}}u_{3}} \\0 & 0 & 0 & x_{3} & y_{3} & 1 & {{- x_{3}}v_{3}} & {{- y_{3}}v_{3}} \\x_{4} & y_{4} & 1 & 0 & 0 & 0 & {{- x_{4}}u_{4}} & {{- y_{4}}u_{4}} \\0 & 0 & 0 & x_{4} & y_{4} & 1 & {{- x_{4}}v_{4}} & {{- y_{4}}v_{4}}\end{pmatrix}$

Further, the following one-dimensional matrix is obtained according tothe coordinates of the detected four vertices of the rectangular area:

$\begin{pmatrix}u_{1} \\v_{1} \\u_{2} \\v_{2} \\u_{3} \\v_{3} \\u_{4} \\v_{4}\end{pmatrix}$

The perspective transformation matrix is denoted as the followingunknown matrix:

$\begin{pmatrix}{m0} & {m1} & {m2} \\{m3} & {m4} & {m5} \\{m6} & {m7} & 1\end{pmatrix},$

which is converted to a one-dimensional matrix as:

$\begin{pmatrix}m_{0} \\m_{1} \\m_{2} \\m_{3} \\m_{4} \\m_{5} \\m_{6} \\m_{7}\end{pmatrix}.$

The perspective transformation matrix is obtained by solving thefollowing matrix equation:

$\begin{pmatrix}u_{1} \\v_{1} \\u_{2} \\v_{2} \\u_{3} \\v_{3} \\u_{4} \\v_{4}\end{pmatrix} = {\begin{pmatrix}x_{1} & y_{1} & 1 & 0 & 0 & 0 & {{- x_{1}}u_{1}} & {{- y_{1}}u_{1}} \\0 & 0 & 0 & x_{1} & y_{1} & 1 & {{- x_{1}}v_{1}} & {{- y_{1}}v_{1}} \\x_{2} & y_{2} & 1 & 0 & 0 & 0 & {{- x_{2}}u_{2}} & {{- y_{2}}u_{2}} \\0 & 0 & 0 & x_{2} & y_{2} & 1 & {{- x_{2}}v_{2}} & {{- y_{2}}v_{2}} \\x_{3} & y_{3} & 1 & 0 & 0 & 0 & {{- x_{3}}u_{3}} & {{- y_{3}}u_{3}} \\0 & 0 & 0 & x_{3} & y_{3} & 1 & {{- x_{3}}v_{3}} & {{- y_{3}}v_{3}} \\x_{4} & y_{4} & 1 & 0 & 0 & 0 & {{- x_{4}}u_{4}} & {{- y_{4}}u_{4}} \\0 & 0 & 0 & x_{4} & y_{4} & 1 & {{- x_{4}}v_{4}} & {{- y_{4}}v_{4}}\end{pmatrix}{\begin{pmatrix}m_{0} \\m_{1} \\m_{2} \\m_{3} \\m_{4} \\m_{5} \\m_{6} \\m_{7}\end{pmatrix}.}}$

The specific solving method is as follows: the coefficient matrix isdenoted as A, and the one-dimensional matrix transformed from theperspective transformation matrix is denoted as B, then the metrixequation A*B=b is obtained. Here, A can be decomposed as: A=L*U, then wehave L*U*B=b. Denoting c=U*B, we have L*c=b. since L and b are bothknown matrices, c can be obtained by the solving.

Since c=U*B, and U is a known matrix, B can be calculated as the inversematrix of U multiplied by c. Then the perspective transformation matrixis restored from b.

In step S25, four vertices of the two-dimensional sticker are determinedaccording to the perspective transformation matrix.

In step S26, the display area of the two-dimensional sticker in thevideo image is determined according to the four vertices of thetwo-dimensional sticker.

In step S27, the two-dimensional sticker is rendered in the displayarea.

For the detailed description of the steps in this embodiment, one mayrefer to the foregoing embodiment, and details are not repeated here.

Those skilled in the art should understand that, on the basis of theabove embodiments, obvious modifications (for example, combining thelisted modes) or equivalent substitutions can also be made.

In the above, although the steps in the above method embodiments aredescribed in the above order, it should be understood by those skilledin the art that the steps in the embodiments of the present disclosureare not necessarily executed in the above order, and may be performed ina reverse order, in parallel, in interleaved or in other orders. On thebasis of the above steps, those skilled in the art may also add othersteps. These obvious modifications or equivalents should also fall inthe protection scope of the present disclosure.

The following are device embodiments of the present disclosure. Thedevice embodiments of the present disclosure can be used to execute thesteps of the method embodiments of the present disclosure. For theconvenience of description, only the parts related to the embodiments ofthe present disclosure are shown. For the specific technical details notdescribed, one may refer to the method embodiments of the presentdisclosure.

Third Embodiment

In order to solve the technical problems of inflexible video images andunintelligent human-computer interaction in the conventional technology,embodiments of the present disclosure provide an image processingapparatus. The apparatus may execute the steps in any image processingmethod described in the first embodiment above. As shown in FIG. 3 , theapparatus mainly includes: an image acquisition module 31, a key pointdetection module 32, a key point acquisition module 33, a display areadetermination module 34 and a sticker display module 35.

The image acquisition module 31 is used to acquire a video image, wherethe video image includes a two-dimensional sticker, and thetwo-dimensional sticker includes a target area.

The key point detection module 32 is configured to perform key pointdetection on the video image to obtain a preset number of first keypoints associated with the target area.

The key point acquisition module 33 is configured to the preset numberof second key points that are marked and associated with the targetarea.

The display area determination module 34 is configured to determine adisplay area of the two-dimensional sticker in the video image accordingto the preset number of the first key points and the preset number ofthe second key points.

The sticker display module 35 is configured to render thetwo-dimensional sticker in the display area.

Further, the display area determination module 34 includes: a matrixdetermination unit 341, a key point determination unit 342 and a displayarea determination unit 343.

The matrix determination unit 341 is configured to determine aperspective transformation matrix according to a correspondence betweenthe preset number of the first key points and the preset number of thesecond key points.

The key point determination unit 342 is configured to determine, in thevideo image, the preset number of third key points corresponding to thetwo-dimensional sticker according to the perspective transformationmatrix.

The display area determination unit 343 is configured to determine thedisplay area of the two-dimensional sticker in the video image accordingto the preset number of the third key points.

Further, the matrix determining unit 341 is specifically configured to:construct a coefficient matrix according to coordinates of the presetnumber of the first key points and coordinates of the preset number ofthe second key points; construct a first one-dimensional matrixaccording to the coordinates of the preset number of the first keypoints; take the perspective transformation matrix as an unknown matrix,and convert the perspective transformation matrix into a secondone-dimensional matrix; form a first matrix equation according to thecoefficient matrix, the first one-dimensional matrix and the secondone-dimensional matrix, where the first matrix equation is that thefirst one-dimensional matrix is equal to the coefficient matrixmultiplied by the second one-dimensional matrix; obtain the secondone-dimensional matrix by solving the first matrix equation; anddetermine the perspective transformation matrix according to the secondone-dimensional matrix.

Further, the matrix determination unit 341 is specifically configuredto: decompose the coefficient matrix into a product of a first matrixand a second matrix; determine a product of the second matrix and thesecond one-dimensional matrix as a third matrix; convert the firstmatrix equation into a second matrix equation according to the thirdmatrix, where the second matrix equation is that the firstone-dimensional matrix is equal to the first matrix multiplied by thethird matrix; obtain the third matrix by solving the second matrixequation; and determine the second one-dimensional matrix according tothe third matrix and the second matrix.

Further, the display area determination unit 343 is specificallyconfigured to: determine a mapping relationship between pixel points inthe display area and pixel points in the two-dimensional sticker; andrender the two-dimensional sticker in the display area according to themapping relationship.

Further, the display area determining unit 343 is specificallyconfigured to: construct, for each of the pixel points in the displayarea, a third one-dimensional matrix for the pixel point in the displayarea; and determine a pixel point in the two-dimensional sticker andcorresponding to the pixel point in the display area as a product of thethird one-dimensional matrix and an inverse matrix of the perspectivetransformation matrix.

Further, the display area determination unit 343 is specificallyconfigured to: determine, for each of the pixel points in the displayarea, a pixel point in the two-dimensional sticker and corresponding tothe pixel point in the display area; and render each of the pixel pointsin the display area according to a pixel value of the pixel point in thetwo-dimensional sticker and corresponding to the pixel point in thedisplay area.

Further, the preset number of the first key points associated with thetarget area are four detected vertices of the target area, and thepreset number of the second key points associated with the target areaare four marked vertices of the target area.

Fourth Embodiment

FIG. 4 shows a schematic structural diagram of an electronic device 400suitable for implementing the embodiments of the present disclosure.Terminal devices in the embodiments of the present disclosure mayinclude, but are not limited to, mobile terminals, such as mobilephones, notebook computers, digital broadcast receivers, PDAs (PersonalDigital Assistants), PADs (Tablet computers), PMPs (Portable MultimediaPlayers), vehicle-mounted terminals (such as in-vehicle navigationterminals), and the like, and fixed terminals such as digital TVs,desktop computers, and the like. The electronic device shown in FIG. 4is only an example, and should not impose any limitation on thefunctions and applications of the embodiments of the present disclosure.

As shown in FIG. 4 , the electronic device 400 may include a processingdevice (such as a central processing unit, a graphics processor) 401that may execute various appropriate actions and processes according toa program stored in a read only memory (ROM) 402 or loaded into randomaccess memory (RAM) 403 from a storage device 406. In the RAM 403,various programs and data necessary for the operation of the electronicdevice 400 are also stored. The processing device 401, the ROM 402, andthe RAM 403 are connected to each other through a bus 404. Aninput/output (I/O) interface 405 is also connected to the bus 404.

Normally, the following devices may be connected to the I/O interface405: an input device 406 such as a touch screen, a touchpad, a keyboard,a mouse, a camera, a microphone, an accelerometer, a gyroscope and thelike; an output device 407, such as a liquid crystal display (LCD), aspeaker, a vibrator and the like; a storage device 406, such as amagnetic tape, a hard disk and the like; and a communication device 409.The communication device 409 may enable the electronic device 400 tocommunicate in a wireless or wired manner with other devices to exchangedata. Although FIG. 4 shows the electronic device 400 having variousmeans, it should be understood that not all of the illustrated means arerequired to be implemented or provided. More or fewer devices mayalternatively be implemented or provided.

In particular, according to embodiments of the present disclosure, theprocesses described above with reference to the flowcharts may beimplemented as computer software programs. For example, embodiments ofthe present disclosure include a computer program product including acomputer program carried on a non-transitory computer readable medium.The computer program includes program code for performing the methodillustrated in the flowchart. In such an embodiment, the computerprogram may be downloaded and installed from the network via thecommunication device 409, or from the storage device 406, or from theROM 402. When the computer program is executed by the processing device401, the above-mentioned functions in the methods of the embodiments ofthe present disclosure are executed.

It should be noted that the computer-readable medium mentioned above inthe present disclosure may be a computer-readable signal medium or acomputer-readable storage medium, or any combination thereof. Thecomputer-readable storage medium may be, for example, but not limitedto, an electrical, magnetic, optical, electromagnetic, infrared, orsemiconductor system, apparatus or device, or any combination thereof.More specific examples of computer readable storage media may include,but are not limited to, electrical connections with one or more wires,portable computer disks, hard disks, a random access memory (RAM), aread only memory (ROM), an erasable Programmable read only memory (EPROMor flash memory), a optical fiber, a portable compact disk read onlymemory (CD-ROM), optical storage devices, magnetic storage devices, orany suitable combination thereof. In this disclosure, acomputer-readable storage medium may be any tangible medium thatcontains or stores a program that can be used by or in conjunction withan instruction execution system, apparatus or device. In the presentdisclosure, a computer-readable signal medium may include a data signalpropagated in baseband or as part of a carrier wave withcomputer-readable program code embodied thereon. Such propagated datasignals may be in a variety of forms, including but not limited toelectromagnetic signals, optical signals, or any suitable combinationthereof. A computer-readable signal medium can also be anycomputer-readable medium other than a computer-readable storage mediumthat can transmit, propagate, or transport the program for use by or inconnection with the instruction execution system, apparatus or device.Program code stored on a computer readable medium may be transmittedusing any suitable medium including, but not limited to, an electricalwire, an optical fiber cable, RF (radio frequency), or any suitablecombination thereof.

In some embodiments, the client and server may use any currently knownor future network protocol such as HTTP (HyperText Transfer Protocol) tocommunicate, and may be connected with digital data network in any formor medium (such as a communication network). Examples of communicationnetworks include local area networks (LAN), wide area networks (WAN),the Internet (eg, the Internet), and peer-to-peer networks (such as adhoc peer-to-peer networks), as well as any current or future network.

The above-mentioned computer-readable medium may be included in theabove-mentioned electronic device, or may exist alone without beingassembled into the electronic device.

The above-mentioned computer-readable medium carries one or moreprograms. The above-mentioned one or more programs, when being executedby the electronic device, cause the electronic device to: acquire avideo image, where the video image includes a two-dimensional sticker,and the two-dimensional sticker includes a target area; perform keypoint detection on the video image to obtain a preset number of firstkey points associated with the target area; acquire the preset number ofsecond key points that are marked and associated with the target area;determine a display area of the two-dimensional sticker in the videoimage according to the preset number of the first key points and thepreset number of the second key points; and render the two-dimensionalsticker in the display area.

Computer program code for performing operations of the presentdisclosure may be written in one or more programming languages,including but not limited to object-oriented programming languages, suchas Java, Smalltalk, C++, and conventional procedural programminglanguages, such as the “C” language or similar programming languages.The program code may be executed entirely on a user computer, or partlyon a user computer, or as a stand-alone software package, or partly on auser computer and partly on a remote computer, or entirely on a remotecomputer or server. In the case of using a remote computer, the remotecomputer may be connected to the user's computer through any kind ofnetwork, including a local area network (LAN) or a wide area network(WAN), or may be connected to an external computer (eg, using Internetconnection provided by an Internet service provider).

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operations of possible implementationsof systems, methods and computer program products according to variousembodiments of the present disclosure. In this regard, each block in theflowcharts or block diagrams may represent a module, program segment, ora portion of code that contains one or more executable instructions forimplementing the specified logical functions. It should also be notedthat, in some alternative implementations, the functions noted in theblocks may occur in an order other than the order shown in the figures.For example, two blocks shown in succession may be executedsubstantially concurrently, or the blocks may sometimes be executed inthe reverse order, depending upon the functionality involved. It is alsonoted that each block of the block diagrams and/or flowchartillustrations, and combinations of blocks in the block diagrams and/orflowchart illustrations, may be implemented in dedicated hardware-basedsystems that perform the specified functions or operations, or may beimplemented by a combination of dedicated hardware and computerinstructions.

The units involved in the embodiments of the present disclosure may beimplemented in a software manner, or in a hardware manner. The name ofthe unit does not constitute a limitation of the unit under anycircumstances. For example, the first acquisition unit may also bedescribed as “a unit for acquiring at least two internet protocoladdresses”.

The functions described above may be performed, at least in part, by oneor more hardware logic components. For example, without limitation,examples of hardware logic components that may be used include: a FieldProgrammable Gate Array (FPGA), a Application Specific IntegratedCircuit (ASIC), an Application Specific Standard Product (ASSP), aSystem on Chip (SOC), a Complex Programmable Logical Device (CPLD) andthe like.

In the present disclosure, a machine-readable medium may be a tangiblemedium that may contain or store a program for use by or in connectionwith the instruction execution system, apparatus or device. Themachine-readable medium may be a machine-readable signal medium or amachine-readable storage medium. Machine-readable media may include, butare not limited to, electronic, magnetic, optical, electromagnetic,infrared, or semiconductor systems, devices, or devices, or any suitablecombination thereof. More specific examples of machine-readable storagemedia include one or more wire-based electrical connections, portablecomputer disks, hard disks, random access memory (RAM), read only memory(ROM), erasable programmable read only memory (EPROM or flash memory),fiber optics, compact disk read only memory (CD-ROM), optical storagedevices, magnetic storage devices, or any suitable combination thereof.

According to one or more embodiments of the present disclosure, an imageprocessing method is provided, including:

-   -   acquiring a video image, where the video image includes a        two-dimensional sticker, and the two-dimensional sticker        includes a target area;    -   performing key point detection on the video image to obtain a        preset number of first key points associated with the target        area;    -   acquiring the preset number of second key points that are marked        and associated with the target area;    -   determining a display area of the two-dimensional sticker in the        video image according to the preset number of the first key        points and the preset number of the second key points; and    -   rendering the two-dimensional sticker in the display area.

Further, the determining a display area of the two-dimensional stickerin the video image according to the preset number of the first keypoints and the preset number of the second key points includes:

-   -   determining a perspective transformation matrix according to a        correspondence between the preset number of the first key points        and the preset number of the second key points;    -   determining, in the video image, the preset number of third key        points corresponding to the two-dimensional sticker according to        the perspective transformation matrix; and    -   determining the display area of the two-dimensional sticker in        the video image according to the preset number of the third key        points.

Further, the determining a perspective transformation matrix accordingto a correspondence between the preset number of the first key pointsand the preset number of the second key points includes:

-   -   constructing a coefficient matrix according to coordinates of        the preset number of the first key points and coordinates of the        preset number of the second key points;    -   constructing a first one-dimensional matrix according to the        coordinates of the preset number of the first key points;    -   taking the perspective transformation matrix as an unknown        matrix, and converting the perspective transformation matrix        into a second one-dimensional matrix;    -   forming a first matrix equation according to the coefficient        matrix, the first one-dimensional matrix and the second        one-dimensional matrix, where the first matrix equation is that        the first one-dimensional matrix is equal to the coefficient        matrix multiplied by the second one-dimensional matrix;    -   obtaining the second one-dimensional matrix by solving the first        matrix equation; and    -   determining the perspective transformation matrix according to        the second one-dimensional matrix.

Further, the obtaining the second one-dimensional matrix by solving thefirst matrix equation includes:

-   -   decomposing the coefficient matrix into a product of a first        matrix and a second matrix;    -   determining a product of the second matrix and the second        one-dimensional matrix as a third matrix;    -   converting the first matrix equation into a second matrix        equation according to the third matrix, where the second matrix        equation is that the first one-dimensional matrix is equal to        the first matrix multiplied by the third matrix;    -   obtaining the third matrix by solving the second matrix        equation; and    -   determining the second one-dimensional matrix according to the        third matrix and the second matrix.

Further, the rendering the two-dimensional sticker in the display areaincludes:

-   -   determining a mapping relationship between pixel points in the        display area and pixel points in the two-dimensional sticker;        and    -   rendering the two-dimensional sticker in the display area        according to the mapping relationship.

Further, the determining a mapping relationship between pixel points inthe display area and pixel points in the two-dimensional stickerincludes:

-   -   constructing, for each of the pixel points in the display area,        a third one-dimensional matrix for the pixel point in the        display area; and    -   determining a pixel point in the two-dimensional sticker and        corresponding to the pixel point in the display area as a        product of the third one-dimensional matrix and an inverse        matrix of the perspective transformation matrix.

Further, the rendering the two-dimensional sticker in the display areaaccording to the mapping relationship includes:

-   -   determining, for each of the pixel points in the display area, a        pixel point in the two-dimensional sticker and corresponding to        the pixel point in the display area; and    -   rendering each of the pixel points in the display area according        to a pixel value of the pixel point in the two-dimensional        sticker and corresponding to the pixel point in the display        area.

Further, the preset number of the first key points associated with thetarget area are four detected vertices of the target area, and thepreset number of the second key points associated with the target areaare four marked vertices of the target area.

According to one or more embodiments of the present disclosure, an imageprocessing apparatus is provided, including:

-   -   an image acquisition module, configured to acquire a video        image, where the video image includes a two-dimensional sticker,        and the two-dimensional sticker includes a target area;    -   a key point detection module, configured to perform key point        detection on the video image to obtain a preset number of first        key points associated with the target area;    -   a key point acquisition module, configured to acquire the preset        number of second key points that are marked and associated with        the target area;    -   a display area determination module, configured to determine a        display area of the two-dimensional sticker in the video image        according to the preset number of the first key points and the        preset number of the second key points; and    -   a sticker display module, configured to render the        two-dimensional sticker in the display area.

Further, the display area determination module 34 includes:

-   -   a matrix determination unit, configured to determine a        perspective transformation matrix according to a correspondence        between the preset number of the first key points and the preset        number of the second key points;    -   a key point determination unit, configured to determine, in the        video image, the preset number of third key points corresponding        to the two-dimensional sticker according to the perspective        transformation matrix; and    -   a display area determination unit, configured to determine the        display area of the two-dimensional sticker in the video image        according to the preset number of the third key points.

Further, the matrix determining unit is specifically configured to:construct a coefficient matrix according to coordinates of the presetnumber of the first key points and coordinates of the preset number ofthe second key points; construct a first one-dimensional matrixaccording to the coordinates of the preset number of the first keypoints; take the perspective transformation matrix as an unknown matrix,and convert the perspective transformation matrix into a secondone-dimensional matrix; form a first matrix equation according to thecoefficient matrix, the first one-dimensional matrix and the secondone-dimensional matrix, where the first matrix equation is that thefirst one-dimensional matrix is equal to the coefficient matrixmultiplied by the second one-dimensional matrix; obtain the secondone-dimensional matrix by solving the first matrix equation; anddetermine the perspective transformation matrix according to the secondone-dimensional matrix.

Further, the matrix determination unit is specifically configured to:decompose the coefficient matrix into a product of a first matrix and asecond matrix; determine a product of the second matrix and the secondone-dimensional matrix as a third matrix; convert the first matrixequation into a second matrix equation according to the third matrix,where the second matrix equation is that the first one-dimensionalmatrix is equal to the first matrix multiplied by the third matrix;obtain the third matrix by solving the second matrix equation; anddetermine the second one-dimensional matrix according to the thirdmatrix and the second matrix.

Further, the display area determination unit is specifically configuredto: determine a mapping relationship between pixel points in the displayarea and pixel points in the two-dimensional sticker; and render thetwo-dimensional sticker in the display area according to the mappingrelationship.

Further, the display area determining unit is specifically configuredto: construct, for each of the pixel points in the display area, a thirdone-dimensional matrix for the pixel point in the display area; anddetermine a pixel point in the two-dimensional sticker and correspondingto the pixel point in the display area as a product of the thirdone-dimensional matrix and an inverse matrix of the perspectivetransformation matrix.

Further, the display area determination unit is specifically configuredto: determine, for each of the pixel points in the display area, a pixelpoint in the two-dimensional sticker and corresponding to the pixelpoint in the display area; and render each of the pixel points in thedisplay area according to a pixel value of the pixel point in thetwo-dimensional sticker and corresponding to the pixel point in thedisplay area.

Further, the preset number of the first key points associated with thetarget area are four detected vertices of the target area, and thepreset number of the second key points associated with the target areaare four marked vertices of the target area.

According to one or more embodiments of the present disclosure, anelectronic device is provided, including:

-   -   a memory, storing non-transitory computer readable instructions;        and    -   a processor, configured to execute the computer readable        instructions to perform the above image processing method.

According to one or more embodiments of the present disclosure, anelectronic device is provided, including a computer-readable storagemedium, storing non-transitory computer readable instructions, where thenon-transitory computer readable instructions, when being executed by acomputer, cause the computer to perform the above image processingmethod.

The above merely describes preferred embodiments of the presentdisclosure and illustrates the technical principles. Those skilled inthe art should understand that the scope of the disclosure is notlimited to the technical solutions formed by the specific combination ofthe above-mentioned technical features, and should also cover, withoutdeparting from the above disclosed concept, the technical solutionsformed by any combination of the above-mentioned technical features orother equivalent features. For example, a technical solution may beformed by replacing a feature with another feature having similarfunction disclosed in the present disclosure (but not limited to).

Additionally, although operations are described in a particular order,this should not be construed as requiring that the operations to beperformed in the particular order shown or in a sequential order. Undercertain circumstances, multitasking and parallel processing may beadvantageous. Similarly, although the above description contains severalimplementation details, these should not be construed as limitations onthe scope of the present disclosure. Some features that are described indifferent embodiments may also be implemented in a same embodiment.Also, various features that are described in a single embodiment may beimplemented in multiple embodiments separately or in any suitablesubcombination.

Although the subject matter has been described in language specific tostructural features and/or logical acts, it is to be understood that thesubject matter defined in the appended claims is not necessarily limitedto the specific features or acts described above. Rather, the specificfeatures and acts described above are merely examples for implementingthe claims.

What is claimed is:
 1. An image processing method, comprising: acquiringa video image, wherein the video image comprises a two-dimensionalsticker, and the two-dimensional sticker comprises a target area;performing key point detection on the video image to obtain a presetnumber of first key points associated with the target area; acquiringthe preset number of second key points that are marked and associatedwith the target area; determining a display area of the two-dimensionalsticker in the video image according to the preset number of the firstkey points and the preset number of the second key points; and renderingthe two-dimensional sticker in the display area.
 2. The method accordingto claim 1, wherein the determining a display area of thetwo-dimensional sticker in the video image according to the presetnumber of the first key points and the preset number of the second keypoints comprises: determining a perspective transformation matrixaccording to a correspondence between the preset number of the first keypoints and the preset number of the second key points; determining, inthe video image, the preset number of third key points corresponding tothe two-dimensional sticker according to the perspective transformationmatrix; and determining the display area of the two-dimensional stickerin the video image according to the preset number of the third keypoints.
 3. The method according to claim 2, wherein the determining aperspective transformation matrix according to a correspondence betweenthe preset number of the first key points and the preset number of thesecond key points comprises: constructing a coefficient matrix accordingto coordinates of the preset number of the first key points andcoordinates of the preset number of the second key points; constructinga first one-dimensional matrix according to the coordinates of thepreset number of the first key points; taking the perspectivetransformation matrix as an unknown matrix, and converting theperspective transformation matrix into a second one-dimensional matrix;forming a first matrix equation according to the coefficient matrix, thefirst one-dimensional matrix and the second one-dimensional matrix,wherein the first matrix equation is that the first one-dimensionalmatrix is equal to the coefficient matrix multiplied by the secondone-dimensional matrix; obtaining the second one-dimensional matrix bysolving the first matrix equation; and determining the perspectivetransformation matrix according to the second one-dimensional matrix. 4.The method according to claim 3, wherein the obtaining the secondone-dimensional matrix by solving the first matrix equation comprises:decomposing the coefficient matrix into a product of a first matrix anda second matrix; determining a product of the second matrix and thesecond one-dimensional matrix as a third matrix; converting the firstmatrix equation into a second matrix equation according to the thirdmatrix, wherein the second matrix equation is that the firstone-dimensional matrix is equal to the first matrix multiplied by thethird matrix; obtaining the third matrix by solving the second matrixequation; and determining the second one-dimensional matrix according tothe third matrix and the second matrix.
 5. The method according to claim2, wherein the rendering the two-dimensional sticker in the display areacomprises: determining a mapping relationship between pixel points inthe display area and pixel points in the two-dimensional sticker; andrendering the two-dimensional sticker in the display area according tothe mapping relationship.
 6. The method according to claim 5, whereinthe determining a mapping relationship between pixel points in thedisplay area and pixel points in the two-dimensional sticker comprises:constructing, for each of the pixel points in the display area, a thirdone-dimensional matrix for the pixel point in the display area; anddetermining a pixel point in the two-dimensional sticker andcorresponding to the pixel point in the display area as a product of thethird one-dimensional matrix and an inverse matrix of the perspectivetransformation matrix.
 7. The method according to claim 5, wherein therendering the two-dimensional sticker in the display area according tothe mapping relationship comprises: determining, for each of the pixelpoints in the display area, a pixel point in the two-dimensional stickerand corresponding to the pixel point in the display area; and renderingeach of the pixel points in the display area according to a pixel valueof the pixel point in the two-dimensional sticker and corresponding tothe pixel point in the display area.
 8. The method according to claim 1,wherein the preset number of the first key points associated with thetarget area are four detected vertices of the target area, and thepreset number of the second key points associated with the target areaare four marked vertices of the target area.
 9. An image processingapparatus, comprising: at least one processor; and at least one memorycommunicatively coupled to the at least one processor and storinginstructions that upon execution by the at least one processor cause theapparatus to: acquire a video image, wherein the video image comprises atwo-dimensional sticker, and the two-dimensional sticker comprises atarget area; perform key point detection on the video image to obtain apreset number of first key points associated with the target area;acquire the preset number of second key points that are marked andassociated with the target area; determine a display area of thetwo-dimensional sticker in the video image according to the presetnumber of the first key points and the preset number of the second keypoints; and render the two-dimensional sticker in the display area. 10.(canceled)
 11. A non-transitory computer-readable storage medium,storing non-transitory computer readable instructions, wherein thenon-transitory computer readable instructions, when being executed by acomputer, cause the computer to: acquire a video image, wherein thevideo image comprises a two-dimensional sticker, and the two-dimensionalsticker comprises a target area; perform key point detection on thevideo image to obtain a preset number of first key points associatedwith the target area; acquire the preset number of second key pointsthat are marked and associated with the target area; determine a displayarea of the two-dimensional sticker in the video image according to thepreset number of the first key points and the preset number of thesecond key points; and render the two-dimensional sticker in the displayarea.
 12. The apparatus of claim 9, the at least one memory furtherstoring instructions that upon execution by the at least one processorcause the apparatus to: determine a perspective transformation matrixaccording to a correspondence between the preset number of the first keypoints and the preset number of the second key points; determine, in thevideo image, the preset number of third key points corresponding to thetwo-dimensional sticker according to the perspective transformationmatrix; and determine the display area of the two-dimensional sticker inthe video image according to the preset number of the third key points.13. The apparatus of claim 12, the at least one memory further storinginstructions that upon execution by the at least one processor cause theapparatus to: construct a coefficient matrix according to coordinates ofthe preset number of the first key points and coordinates of the presetnumber of the second key points; construct a first one-dimensionalmatrix according to the coordinates of the preset number of the firstkey points; take the perspective transformation matrix as an unknownmatrix, and converting the perspective transformation matrix into asecond one-dimensional matrix; form a first matrix equation according tothe coefficient matrix, the first one-dimensional matrix and the secondone-dimensional matrix, wherein the first matrix equation is that thefirst one-dimensional matrix is equal to the coefficient matrixmultiplied by the second one-dimensional matrix; obtain the secondone-dimensional matrix by solving the first matrix equation; anddetermine the perspective transformation matrix according to the secondone-dimensional matrix.
 14. The apparatus of claim 13, the at least onememory further storing instructions that upon execution by the at leastone processor cause the apparatus to: decompose the coefficient matrixinto a product of a first matrix and a second matrix; determine aproduct of the second matrix and the second one-dimensional matrix as athird matrix; convert the first matrix equation into a second matrixequation according to the third matrix, wherein the second matrixequation is that the first one-dimensional matrix is equal to the firstmatrix multiplied by the third matrix; obtain the third matrix bysolving the second matrix equation; and determine the secondone-dimensional matrix according to the third matrix and the secondmatrix.
 15. The apparatus of claim 12, the at least one memory furtherstoring instructions that upon execution by the at least one processorcause the apparatus to: determine a mapping relationship between pixelpoints in the display area and pixel points in the two-dimensionalsticker; and render the two-dimensional sticker in the display areaaccording to the mapping relationship.
 16. The apparatus of claim 15,the at least one memory further storing instructions that upon executionby the at least one processor cause the apparatus to: construct, foreach of the pixel points in the display area, a third one-dimensionalmatrix for the pixel point in the display area; and determine a pixelpoint in the two-dimensional sticker and corresponding to the pixelpoint in the display area as a product of the third one-dimensionalmatrix and an inverse matrix of the perspective transformation matrix.17. The apparatus of claim 15, the at least one memory further storinginstructions that upon execution by the at least one processor cause theapparatus to: determine, for each of the pixel points in the displayarea, a pixel point in the two-dimensional sticker and corresponding tothe pixel point in the display area; and render each of the pixel pointsin the display area according to a pixel value of the pixel point in thetwo-dimensional sticker and corresponding to the pixel point in thedisplay area.
 18. The apparatus of claim 9, wherein the preset number ofthe first key points associated with the target area are four detectedvertices of the target area, and the preset number of the second keypoints associated with the target area are four marked vertices of thetarget area.